var $protobuf = window.protobuf;
$protobuf.roots.default=window;
// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.msg = (function() {

    /**
     * Namespace msg.
     * @exports msg
     * @namespace
     */
    var msg = {};

    msg.LoginRequest = (function() {

        /**
         * Properties of a LoginRequest.
         * @memberof msg
         * @interface ILoginRequest
         * @property {number|null} [account_id] LoginRequest account_id
         * @property {string|null} [request_info] LoginRequest request_info
         */

        /**
         * Constructs a new LoginRequest.
         * @memberof msg
         * @classdesc Represents a LoginRequest.
         * @implements ILoginRequest
         * @constructor
         * @param {msg.ILoginRequest=} [properties] Properties to set
         */
        function LoginRequest(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * LoginRequest account_id.
         * @member {number} account_id
         * @memberof msg.LoginRequest
         * @instance
         */
        LoginRequest.prototype.account_id = 0;

        /**
         * LoginRequest request_info.
         * @member {string} request_info
         * @memberof msg.LoginRequest
         * @instance
         */
        LoginRequest.prototype.request_info = "";

        /**
         * Creates a new LoginRequest instance using the specified properties.
         * @function create
         * @memberof msg.LoginRequest
         * @static
         * @param {msg.ILoginRequest=} [properties] Properties to set
         * @returns {msg.LoginRequest} LoginRequest instance
         */
        LoginRequest.create = function create(properties) {
            return new LoginRequest(properties);
        };

        /**
         * Encodes the specified LoginRequest message. Does not implicitly {@link msg.LoginRequest.verify|verify} messages.
         * @function encode
         * @memberof msg.LoginRequest
         * @static
         * @param {msg.ILoginRequest} message LoginRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LoginRequest.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.account_id);
            if (message.request_info != null && Object.hasOwnProperty.call(message, "request_info"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.request_info);
            return writer;
        };

        /**
         * Encodes the specified LoginRequest message, length delimited. Does not implicitly {@link msg.LoginRequest.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.LoginRequest
         * @static
         * @param {msg.ILoginRequest} message LoginRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LoginRequest.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a LoginRequest message from the specified reader or buffer.
         * @function decode
         * @memberof msg.LoginRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.LoginRequest} LoginRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LoginRequest.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.LoginRequest();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.account_id = reader.int32();
                    break;
                case 2:
                    message.request_info = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a LoginRequest message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.LoginRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.LoginRequest} LoginRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LoginRequest.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a LoginRequest message.
         * @function verify
         * @memberof msg.LoginRequest
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        LoginRequest.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.account_id != null && message.hasOwnProperty("account_id"))
                if (!$util.isInteger(message.account_id))
                    return "account_id: integer expected";
            if (message.request_info != null && message.hasOwnProperty("request_info"))
                if (!$util.isString(message.request_info))
                    return "request_info: string expected";
            return null;
        };

        return LoginRequest;
    })();

    msg.LoginResponse = (function() {

        /**
         * Properties of a LoginResponse.
         * @memberof msg
         * @interface ILoginResponse
         * @property {number|null} [code] LoginResponse code
         * @property {msg.IUserInfo|null} [user_info] LoginResponse user_info
         * @property {number|null} [cur_sessions] LoginResponse cur_sessions
         * @property {Object.<string,msg.IMapFightInfo>|null} [fight_hero_info] LoginResponse fight_hero_info
         * @property {Object.<string,msg.IUserWagerInfo>|null} [user_wager_info] LoginResponse user_wager_info
         */

        /**
         * Constructs a new LoginResponse.
         * @memberof msg
         * @classdesc Represents a LoginResponse.
         * @implements ILoginResponse
         * @constructor
         * @param {msg.ILoginResponse=} [properties] Properties to set
         */
        function LoginResponse(properties) {
            this.fight_hero_info = {};
            this.user_wager_info = {};
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * LoginResponse code.
         * @member {number} code
         * @memberof msg.LoginResponse
         * @instance
         */
        LoginResponse.prototype.code = 0;

        /**
         * LoginResponse user_info.
         * @member {msg.IUserInfo|null|undefined} user_info
         * @memberof msg.LoginResponse
         * @instance
         */
        LoginResponse.prototype.user_info = null;

        /**
         * LoginResponse cur_sessions.
         * @member {number} cur_sessions
         * @memberof msg.LoginResponse
         * @instance
         */
        LoginResponse.prototype.cur_sessions = 0;

        /**
         * LoginResponse fight_hero_info.
         * @member {Object.<string,msg.IMapFightInfo>} fight_hero_info
         * @memberof msg.LoginResponse
         * @instance
         */
        LoginResponse.prototype.fight_hero_info = $util.emptyObject;

        /**
         * LoginResponse user_wager_info.
         * @member {Object.<string,msg.IUserWagerInfo>} user_wager_info
         * @memberof msg.LoginResponse
         * @instance
         */
        LoginResponse.prototype.user_wager_info = $util.emptyObject;

        /**
         * Creates a new LoginResponse instance using the specified properties.
         * @function create
         * @memberof msg.LoginResponse
         * @static
         * @param {msg.ILoginResponse=} [properties] Properties to set
         * @returns {msg.LoginResponse} LoginResponse instance
         */
        LoginResponse.create = function create(properties) {
            return new LoginResponse(properties);
        };

        /**
         * Encodes the specified LoginResponse message. Does not implicitly {@link msg.LoginResponse.verify|verify} messages.
         * @function encode
         * @memberof msg.LoginResponse
         * @static
         * @param {msg.ILoginResponse} message LoginResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LoginResponse.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.code != null && Object.hasOwnProperty.call(message, "code"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
            if (message.user_info != null && Object.hasOwnProperty.call(message, "user_info"))
                $root.msg.UserInfo.encode(message.user_info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.cur_sessions != null && Object.hasOwnProperty.call(message, "cur_sessions"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.cur_sessions);
            if (message.fight_hero_info != null && Object.hasOwnProperty.call(message, "fight_hero_info"))
                for (var keys = Object.keys(message.fight_hero_info), i = 0; i < keys.length; ++i) {
                    writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]);
                    $root.msg.MapFightInfo.encode(message.fight_hero_info[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
                }
            if (message.user_wager_info != null && Object.hasOwnProperty.call(message, "user_wager_info"))
                for (var keys = Object.keys(message.user_wager_info), i = 0; i < keys.length; ++i) {
                    writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]);
                    $root.msg.UserWagerInfo.encode(message.user_wager_info[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
                }
            return writer;
        };

        /**
         * Encodes the specified LoginResponse message, length delimited. Does not implicitly {@link msg.LoginResponse.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.LoginResponse
         * @static
         * @param {msg.ILoginResponse} message LoginResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LoginResponse.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a LoginResponse message from the specified reader or buffer.
         * @function decode
         * @memberof msg.LoginResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.LoginResponse} LoginResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LoginResponse.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.LoginResponse(), key, value;
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.code = reader.int32();
                    break;
                case 2:
                    message.user_info = $root.msg.UserInfo.decode(reader, reader.uint32());
                    break;
                case 3:
                    message.cur_sessions = reader.int32();
                    break;
                case 4:
                    if (message.fight_hero_info === $util.emptyObject)
                        message.fight_hero_info = {};
                    var end2 = reader.uint32() + reader.pos;
                    key = 0;
                    value = null;
                    while (reader.pos < end2) {
                        var tag2 = reader.uint32();
                        switch (tag2 >>> 3) {
                        case 1:
                            key = reader.int32();
                            break;
                        case 2:
                            value = $root.msg.MapFightInfo.decode(reader, reader.uint32());
                            break;
                        default:
                            reader.skipType(tag2 & 7);
                            break;
                        }
                    }
                    message.fight_hero_info[key] = value;
                    break;
                case 5:
                    if (message.user_wager_info === $util.emptyObject)
                        message.user_wager_info = {};
                    var end2 = reader.uint32() + reader.pos;
                    key = 0;
                    value = null;
                    while (reader.pos < end2) {
                        var tag2 = reader.uint32();
                        switch (tag2 >>> 3) {
                        case 1:
                            key = reader.int32();
                            break;
                        case 2:
                            value = $root.msg.UserWagerInfo.decode(reader, reader.uint32());
                            break;
                        default:
                            reader.skipType(tag2 & 7);
                            break;
                        }
                    }
                    message.user_wager_info[key] = value;
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a LoginResponse message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.LoginResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.LoginResponse} LoginResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LoginResponse.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a LoginResponse message.
         * @function verify
         * @memberof msg.LoginResponse
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        LoginResponse.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.code != null && message.hasOwnProperty("code"))
                if (!$util.isInteger(message.code))
                    return "code: integer expected";
            if (message.user_info != null && message.hasOwnProperty("user_info")) {
                var error = $root.msg.UserInfo.verify(message.user_info);
                if (error)
                    return "user_info." + error;
            }
            if (message.cur_sessions != null && message.hasOwnProperty("cur_sessions"))
                if (!$util.isInteger(message.cur_sessions))
                    return "cur_sessions: integer expected";
            if (message.fight_hero_info != null && message.hasOwnProperty("fight_hero_info")) {
                if (!$util.isObject(message.fight_hero_info))
                    return "fight_hero_info: object expected";
                var key = Object.keys(message.fight_hero_info);
                for (var i = 0; i < key.length; ++i) {
                    if (!$util.key32Re.test(key[i]))
                        return "fight_hero_info: integer key{k:int32} expected";
                    {
                        var error = $root.msg.MapFightInfo.verify(message.fight_hero_info[key[i]]);
                        if (error)
                            return "fight_hero_info." + error;
                    }
                }
            }
            if (message.user_wager_info != null && message.hasOwnProperty("user_wager_info")) {
                if (!$util.isObject(message.user_wager_info))
                    return "user_wager_info: object expected";
                var key = Object.keys(message.user_wager_info);
                for (var i = 0; i < key.length; ++i) {
                    if (!$util.key32Re.test(key[i]))
                        return "user_wager_info: integer key{k:int32} expected";
                    {
                        var error = $root.msg.UserWagerInfo.verify(message.user_wager_info[key[i]]);
                        if (error)
                            return "user_wager_info." + error;
                    }
                }
            }
            return null;
        };

        return LoginResponse;
    })();

    msg.UserInfo = (function() {

        /**
         * Properties of a UserInfo.
         * @memberof msg
         * @interface IUserInfo
         * @property {string|null} [user_name] UserInfo user_name
         * @property {number|null} [user_icon] UserInfo user_icon
         */

        /**
         * Constructs a new UserInfo.
         * @memberof msg
         * @classdesc Represents a UserInfo.
         * @implements IUserInfo
         * @constructor
         * @param {msg.IUserInfo=} [properties] Properties to set
         */
        function UserInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UserInfo user_name.
         * @member {string} user_name
         * @memberof msg.UserInfo
         * @instance
         */
        UserInfo.prototype.user_name = "";

        /**
         * UserInfo user_icon.
         * @member {number} user_icon
         * @memberof msg.UserInfo
         * @instance
         */
        UserInfo.prototype.user_icon = 0;

        /**
         * Creates a new UserInfo instance using the specified properties.
         * @function create
         * @memberof msg.UserInfo
         * @static
         * @param {msg.IUserInfo=} [properties] Properties to set
         * @returns {msg.UserInfo} UserInfo instance
         */
        UserInfo.create = function create(properties) {
            return new UserInfo(properties);
        };

        /**
         * Encodes the specified UserInfo message. Does not implicitly {@link msg.UserInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.UserInfo
         * @static
         * @param {msg.IUserInfo} message UserInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.user_name != null && Object.hasOwnProperty.call(message, "user_name"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.user_name);
            if (message.user_icon != null && Object.hasOwnProperty.call(message, "user_icon"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.user_icon);
            return writer;
        };

        /**
         * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link msg.UserInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.UserInfo
         * @static
         * @param {msg.IUserInfo} message UserInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.UserInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.UserInfo} UserInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.user_name = reader.string();
                    break;
                case 2:
                    message.user_icon = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.UserInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.UserInfo} UserInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserInfo message.
         * @function verify
         * @memberof msg.UserInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.user_name != null && message.hasOwnProperty("user_name"))
                if (!$util.isString(message.user_name))
                    return "user_name: string expected";
            if (message.user_icon != null && message.hasOwnProperty("user_icon"))
                if (!$util.isInteger(message.user_icon))
                    return "user_icon: integer expected";
            return null;
        };

        return UserInfo;
    })();

    msg.FightHeroInfo = (function() {

        /**
         * Properties of a FightHeroInfo.
         * @memberof msg
         * @interface IFightHeroInfo
         * @property {number|null} [hero_id] FightHeroInfo hero_id
         * @property {string|null} [hero_name] FightHeroInfo hero_name
         * @property {number|null} [hero_character] FightHeroInfo hero_character
         * @property {number|null} [hero_skill] FightHeroInfo hero_skill
         * @property {number|null} [hero_odds] FightHeroInfo hero_odds
         * @property {number|Long|null} [hero_wager] FightHeroInfo hero_wager
         */

        /**
         * Constructs a new FightHeroInfo.
         * @memberof msg
         * @classdesc Represents a FightHeroInfo.
         * @implements IFightHeroInfo
         * @constructor
         * @param {msg.IFightHeroInfo=} [properties] Properties to set
         */
        function FightHeroInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * FightHeroInfo hero_id.
         * @member {number} hero_id
         * @memberof msg.FightHeroInfo
         * @instance
         */
        FightHeroInfo.prototype.hero_id = 0;

        /**
         * FightHeroInfo hero_name.
         * @member {string} hero_name
         * @memberof msg.FightHeroInfo
         * @instance
         */
        FightHeroInfo.prototype.hero_name = "";

        /**
         * FightHeroInfo hero_character.
         * @member {number} hero_character
         * @memberof msg.FightHeroInfo
         * @instance
         */
        FightHeroInfo.prototype.hero_character = 0;

        /**
         * FightHeroInfo hero_skill.
         * @member {number} hero_skill
         * @memberof msg.FightHeroInfo
         * @instance
         */
        FightHeroInfo.prototype.hero_skill = 0;

        /**
         * FightHeroInfo hero_odds.
         * @member {number} hero_odds
         * @memberof msg.FightHeroInfo
         * @instance
         */
        FightHeroInfo.prototype.hero_odds = 0;

        /**
         * FightHeroInfo hero_wager.
         * @member {number|Long} hero_wager
         * @memberof msg.FightHeroInfo
         * @instance
         */
        FightHeroInfo.prototype.hero_wager = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Creates a new FightHeroInfo instance using the specified properties.
         * @function create
         * @memberof msg.FightHeroInfo
         * @static
         * @param {msg.IFightHeroInfo=} [properties] Properties to set
         * @returns {msg.FightHeroInfo} FightHeroInfo instance
         */
        FightHeroInfo.create = function create(properties) {
            return new FightHeroInfo(properties);
        };

        /**
         * Encodes the specified FightHeroInfo message. Does not implicitly {@link msg.FightHeroInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.FightHeroInfo
         * @static
         * @param {msg.IFightHeroInfo} message FightHeroInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        FightHeroInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hero_id);
            if (message.hero_name != null && Object.hasOwnProperty.call(message, "hero_name"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.hero_name);
            if (message.hero_character != null && Object.hasOwnProperty.call(message, "hero_character"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.hero_character);
            if (message.hero_skill != null && Object.hasOwnProperty.call(message, "hero_skill"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hero_skill);
            if (message.hero_odds != null && Object.hasOwnProperty.call(message, "hero_odds"))
                writer.uint32(/* id 5, wireType 1 =*/41).double(message.hero_odds);
            if (message.hero_wager != null && Object.hasOwnProperty.call(message, "hero_wager"))
                writer.uint32(/* id 6, wireType 0 =*/48).int64(message.hero_wager);
            return writer;
        };

        /**
         * Encodes the specified FightHeroInfo message, length delimited. Does not implicitly {@link msg.FightHeroInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.FightHeroInfo
         * @static
         * @param {msg.IFightHeroInfo} message FightHeroInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        FightHeroInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a FightHeroInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.FightHeroInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.FightHeroInfo} FightHeroInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        FightHeroInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.FightHeroInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.hero_id = reader.int32();
                    break;
                case 2:
                    message.hero_name = reader.string();
                    break;
                case 3:
                    message.hero_character = reader.int32();
                    break;
                case 4:
                    message.hero_skill = reader.int32();
                    break;
                case 5:
                    message.hero_odds = reader.double();
                    break;
                case 6:
                    message.hero_wager = reader.int64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a FightHeroInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.FightHeroInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.FightHeroInfo} FightHeroInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        FightHeroInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a FightHeroInfo message.
         * @function verify
         * @memberof msg.FightHeroInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        FightHeroInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.hero_id != null && message.hasOwnProperty("hero_id"))
                if (!$util.isInteger(message.hero_id))
                    return "hero_id: integer expected";
            if (message.hero_name != null && message.hasOwnProperty("hero_name"))
                if (!$util.isString(message.hero_name))
                    return "hero_name: string expected";
            if (message.hero_character != null && message.hasOwnProperty("hero_character"))
                if (!$util.isInteger(message.hero_character))
                    return "hero_character: integer expected";
            if (message.hero_skill != null && message.hasOwnProperty("hero_skill"))
                if (!$util.isInteger(message.hero_skill))
                    return "hero_skill: integer expected";
            if (message.hero_odds != null && message.hasOwnProperty("hero_odds"))
                if (typeof message.hero_odds !== "number")
                    return "hero_odds: number expected";
            if (message.hero_wager != null && message.hasOwnProperty("hero_wager"))
                if (!$util.isInteger(message.hero_wager) && !(message.hero_wager && $util.isInteger(message.hero_wager.low) && $util.isInteger(message.hero_wager.high)))
                    return "hero_wager: integer|Long expected";
            return null;
        };

        return FightHeroInfo;
    })();

    msg.FightInfo = (function() {

        /**
         * Properties of a FightInfo.
         * @memberof msg
         * @interface IFightInfo
         * @property {msg.IFightHeroInfo|null} [Left_Hero_Info] FightInfo Left_Hero_Info
         * @property {msg.IFightHeroInfo|null} [Right_Hero_Info] FightInfo Right_Hero_Info
         */

        /**
         * Constructs a new FightInfo.
         * @memberof msg
         * @classdesc Represents a FightInfo.
         * @implements IFightInfo
         * @constructor
         * @param {msg.IFightInfo=} [properties] Properties to set
         */
        function FightInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * FightInfo Left_Hero_Info.
         * @member {msg.IFightHeroInfo|null|undefined} Left_Hero_Info
         * @memberof msg.FightInfo
         * @instance
         */
        FightInfo.prototype.Left_Hero_Info = null;

        /**
         * FightInfo Right_Hero_Info.
         * @member {msg.IFightHeroInfo|null|undefined} Right_Hero_Info
         * @memberof msg.FightInfo
         * @instance
         */
        FightInfo.prototype.Right_Hero_Info = null;

        /**
         * Creates a new FightInfo instance using the specified properties.
         * @function create
         * @memberof msg.FightInfo
         * @static
         * @param {msg.IFightInfo=} [properties] Properties to set
         * @returns {msg.FightInfo} FightInfo instance
         */
        FightInfo.create = function create(properties) {
            return new FightInfo(properties);
        };

        /**
         * Encodes the specified FightInfo message. Does not implicitly {@link msg.FightInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.FightInfo
         * @static
         * @param {msg.IFightInfo} message FightInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        FightInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.Left_Hero_Info != null && Object.hasOwnProperty.call(message, "Left_Hero_Info"))
                $root.msg.FightHeroInfo.encode(message.Left_Hero_Info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.Right_Hero_Info != null && Object.hasOwnProperty.call(message, "Right_Hero_Info"))
                $root.msg.FightHeroInfo.encode(message.Right_Hero_Info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified FightInfo message, length delimited. Does not implicitly {@link msg.FightInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.FightInfo
         * @static
         * @param {msg.IFightInfo} message FightInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        FightInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a FightInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.FightInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.FightInfo} FightInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        FightInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.FightInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.Left_Hero_Info = $root.msg.FightHeroInfo.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.Right_Hero_Info = $root.msg.FightHeroInfo.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a FightInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.FightInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.FightInfo} FightInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        FightInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a FightInfo message.
         * @function verify
         * @memberof msg.FightInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        FightInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.Left_Hero_Info != null && message.hasOwnProperty("Left_Hero_Info")) {
                var error = $root.msg.FightHeroInfo.verify(message.Left_Hero_Info);
                if (error)
                    return "Left_Hero_Info." + error;
            }
            if (message.Right_Hero_Info != null && message.hasOwnProperty("Right_Hero_Info")) {
                var error = $root.msg.FightHeroInfo.verify(message.Right_Hero_Info);
                if (error)
                    return "Right_Hero_Info." + error;
            }
            return null;
        };

        return FightInfo;
    })();

    msg.MapFightInfo = (function() {

        /**
         * Properties of a MapFightInfo.
         * @memberof msg
         * @interface IMapFightInfo
         * @property {Object.<string,msg.IFightInfo>|null} [Map_Fight_Info] MapFightInfo Map_Fight_Info
         */

        /**
         * Constructs a new MapFightInfo.
         * @memberof msg
         * @classdesc Represents a MapFightInfo.
         * @implements IMapFightInfo
         * @constructor
         * @param {msg.IMapFightInfo=} [properties] Properties to set
         */
        function MapFightInfo(properties) {
            this.Map_Fight_Info = {};
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * MapFightInfo Map_Fight_Info.
         * @member {Object.<string,msg.IFightInfo>} Map_Fight_Info
         * @memberof msg.MapFightInfo
         * @instance
         */
        MapFightInfo.prototype.Map_Fight_Info = $util.emptyObject;

        /**
         * Creates a new MapFightInfo instance using the specified properties.
         * @function create
         * @memberof msg.MapFightInfo
         * @static
         * @param {msg.IMapFightInfo=} [properties] Properties to set
         * @returns {msg.MapFightInfo} MapFightInfo instance
         */
        MapFightInfo.create = function create(properties) {
            return new MapFightInfo(properties);
        };

        /**
         * Encodes the specified MapFightInfo message. Does not implicitly {@link msg.MapFightInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.MapFightInfo
         * @static
         * @param {msg.IMapFightInfo} message MapFightInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MapFightInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.Map_Fight_Info != null && Object.hasOwnProperty.call(message, "Map_Fight_Info"))
                for (var keys = Object.keys(message.Map_Fight_Info), i = 0; i < keys.length; ++i) {
                    writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]);
                    $root.msg.FightInfo.encode(message.Map_Fight_Info[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
                }
            return writer;
        };

        /**
         * Encodes the specified MapFightInfo message, length delimited. Does not implicitly {@link msg.MapFightInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.MapFightInfo
         * @static
         * @param {msg.IMapFightInfo} message MapFightInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MapFightInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MapFightInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.MapFightInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.MapFightInfo} MapFightInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MapFightInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.MapFightInfo(), key, value;
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    if (message.Map_Fight_Info === $util.emptyObject)
                        message.Map_Fight_Info = {};
                    var end2 = reader.uint32() + reader.pos;
                    key = 0;
                    value = null;
                    while (reader.pos < end2) {
                        var tag2 = reader.uint32();
                        switch (tag2 >>> 3) {
                        case 1:
                            key = reader.int32();
                            break;
                        case 2:
                            value = $root.msg.FightInfo.decode(reader, reader.uint32());
                            break;
                        default:
                            reader.skipType(tag2 & 7);
                            break;
                        }
                    }
                    message.Map_Fight_Info[key] = value;
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MapFightInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.MapFightInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.MapFightInfo} MapFightInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MapFightInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MapFightInfo message.
         * @function verify
         * @memberof msg.MapFightInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MapFightInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.Map_Fight_Info != null && message.hasOwnProperty("Map_Fight_Info")) {
                if (!$util.isObject(message.Map_Fight_Info))
                    return "Map_Fight_Info: object expected";
                var key = Object.keys(message.Map_Fight_Info);
                for (var i = 0; i < key.length; ++i) {
                    if (!$util.key32Re.test(key[i]))
                        return "Map_Fight_Info: integer key{k:int32} expected";
                    {
                        var error = $root.msg.FightInfo.verify(message.Map_Fight_Info[key[i]]);
                        if (error)
                            return "Map_Fight_Info." + error;
                    }
                }
            }
            return null;
        };

        return MapFightInfo;
    })();

    msg.UserWagerInfo = (function() {

        /**
         * Properties of a UserWagerInfo.
         * @memberof msg
         * @interface IUserWagerInfo
         * @property {number|null} [hero_id] UserWagerInfo hero_id
         * @property {number|Long|null} [wager_money] UserWagerInfo wager_money
         */

        /**
         * Constructs a new UserWagerInfo.
         * @memberof msg
         * @classdesc Represents a UserWagerInfo.
         * @implements IUserWagerInfo
         * @constructor
         * @param {msg.IUserWagerInfo=} [properties] Properties to set
         */
        function UserWagerInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UserWagerInfo hero_id.
         * @member {number} hero_id
         * @memberof msg.UserWagerInfo
         * @instance
         */
        UserWagerInfo.prototype.hero_id = 0;

        /**
         * UserWagerInfo wager_money.
         * @member {number|Long} wager_money
         * @memberof msg.UserWagerInfo
         * @instance
         */
        UserWagerInfo.prototype.wager_money = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Creates a new UserWagerInfo instance using the specified properties.
         * @function create
         * @memberof msg.UserWagerInfo
         * @static
         * @param {msg.IUserWagerInfo=} [properties] Properties to set
         * @returns {msg.UserWagerInfo} UserWagerInfo instance
         */
        UserWagerInfo.create = function create(properties) {
            return new UserWagerInfo(properties);
        };

        /**
         * Encodes the specified UserWagerInfo message. Does not implicitly {@link msg.UserWagerInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.UserWagerInfo
         * @static
         * @param {msg.IUserWagerInfo} message UserWagerInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWagerInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hero_id);
            if (message.wager_money != null && Object.hasOwnProperty.call(message, "wager_money"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.wager_money);
            return writer;
        };

        /**
         * Encodes the specified UserWagerInfo message, length delimited. Does not implicitly {@link msg.UserWagerInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.UserWagerInfo
         * @static
         * @param {msg.IUserWagerInfo} message UserWagerInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWagerInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserWagerInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.UserWagerInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.UserWagerInfo} UserWagerInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWagerInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserWagerInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.hero_id = reader.int32();
                    break;
                case 2:
                    message.wager_money = reader.int64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserWagerInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.UserWagerInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.UserWagerInfo} UserWagerInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWagerInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserWagerInfo message.
         * @function verify
         * @memberof msg.UserWagerInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserWagerInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.hero_id != null && message.hasOwnProperty("hero_id"))
                if (!$util.isInteger(message.hero_id))
                    return "hero_id: integer expected";
            if (message.wager_money != null && message.hasOwnProperty("wager_money"))
                if (!$util.isInteger(message.wager_money) && !(message.wager_money && $util.isInteger(message.wager_money.low) && $util.isInteger(message.wager_money.high)))
                    return "wager_money: integer|Long expected";
            return null;
        };

        return UserWagerInfo;
    })();

    msg.HeroFightResult = (function() {

        /**
         * Properties of a HeroFightResult.
         * @memberof msg
         * @interface IHeroFightResult
         * @property {number|null} [fight_step] HeroFightResult fight_step
         * @property {Array.<number>|null} [fight_win_hero] HeroFightResult fight_win_hero
         * @property {Array.<number>|null} [fight_lose_hero] HeroFightResult fight_lose_hero
         */

        /**
         * Constructs a new HeroFightResult.
         * @memberof msg
         * @classdesc Represents a HeroFightResult.
         * @implements IHeroFightResult
         * @constructor
         * @param {msg.IHeroFightResult=} [properties] Properties to set
         */
        function HeroFightResult(properties) {
            this.fight_win_hero = [];
            this.fight_lose_hero = [];
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * HeroFightResult fight_step.
         * @member {number} fight_step
         * @memberof msg.HeroFightResult
         * @instance
         */
        HeroFightResult.prototype.fight_step = 0;

        /**
         * HeroFightResult fight_win_hero.
         * @member {Array.<number>} fight_win_hero
         * @memberof msg.HeroFightResult
         * @instance
         */
        HeroFightResult.prototype.fight_win_hero = $util.emptyArray;

        /**
         * HeroFightResult fight_lose_hero.
         * @member {Array.<number>} fight_lose_hero
         * @memberof msg.HeroFightResult
         * @instance
         */
        HeroFightResult.prototype.fight_lose_hero = $util.emptyArray;

        /**
         * Creates a new HeroFightResult instance using the specified properties.
         * @function create
         * @memberof msg.HeroFightResult
         * @static
         * @param {msg.IHeroFightResult=} [properties] Properties to set
         * @returns {msg.HeroFightResult} HeroFightResult instance
         */
        HeroFightResult.create = function create(properties) {
            return new HeroFightResult(properties);
        };

        /**
         * Encodes the specified HeroFightResult message. Does not implicitly {@link msg.HeroFightResult.verify|verify} messages.
         * @function encode
         * @memberof msg.HeroFightResult
         * @static
         * @param {msg.IHeroFightResult} message HeroFightResult message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        HeroFightResult.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.fight_step != null && Object.hasOwnProperty.call(message, "fight_step"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fight_step);
            if (message.fight_win_hero != null && message.fight_win_hero.length) {
                writer.uint32(/* id 2, wireType 2 =*/18).fork();
                for (var i = 0; i < message.fight_win_hero.length; ++i)
                    writer.int32(message.fight_win_hero[i]);
                writer.ldelim();
            }
            if (message.fight_lose_hero != null && message.fight_lose_hero.length) {
                writer.uint32(/* id 3, wireType 2 =*/26).fork();
                for (var i = 0; i < message.fight_lose_hero.length; ++i)
                    writer.int32(message.fight_lose_hero[i]);
                writer.ldelim();
            }
            return writer;
        };

        /**
         * Encodes the specified HeroFightResult message, length delimited. Does not implicitly {@link msg.HeroFightResult.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.HeroFightResult
         * @static
         * @param {msg.IHeroFightResult} message HeroFightResult message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        HeroFightResult.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a HeroFightResult message from the specified reader or buffer.
         * @function decode
         * @memberof msg.HeroFightResult
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.HeroFightResult} HeroFightResult
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        HeroFightResult.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.HeroFightResult();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.fight_step = reader.int32();
                    break;
                case 2:
                    if (!(message.fight_win_hero && message.fight_win_hero.length))
                        message.fight_win_hero = [];
                    if ((tag & 7) === 2) {
                        var end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2)
                            message.fight_win_hero.push(reader.int32());
                    } else
                        message.fight_win_hero.push(reader.int32());
                    break;
                case 3:
                    if (!(message.fight_lose_hero && message.fight_lose_hero.length))
                        message.fight_lose_hero = [];
                    if ((tag & 7) === 2) {
                        var end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2)
                            message.fight_lose_hero.push(reader.int32());
                    } else
                        message.fight_lose_hero.push(reader.int32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a HeroFightResult message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.HeroFightResult
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.HeroFightResult} HeroFightResult
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        HeroFightResult.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a HeroFightResult message.
         * @function verify
         * @memberof msg.HeroFightResult
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        HeroFightResult.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.fight_step != null && message.hasOwnProperty("fight_step"))
                if (!$util.isInteger(message.fight_step))
                    return "fight_step: integer expected";
            if (message.fight_win_hero != null && message.hasOwnProperty("fight_win_hero")) {
                if (!Array.isArray(message.fight_win_hero))
                    return "fight_win_hero: array expected";
                for (var i = 0; i < message.fight_win_hero.length; ++i)
                    if (!$util.isInteger(message.fight_win_hero[i]))
                        return "fight_win_hero: integer[] expected";
            }
            if (message.fight_lose_hero != null && message.hasOwnProperty("fight_lose_hero")) {
                if (!Array.isArray(message.fight_lose_hero))
                    return "fight_lose_hero: array expected";
                for (var i = 0; i < message.fight_lose_hero.length; ++i)
                    if (!$util.isInteger(message.fight_lose_hero[i]))
                        return "fight_lose_hero: integer[] expected";
            }
            return null;
        };

        return HeroFightResult;
    })();

    msg.NewFightInfo = (function() {

        /**
         * Properties of a NewFightInfo.
         * @memberof msg
         * @interface INewFightInfo
         * @property {number|null} [current_step] NewFightInfo current_step
         * @property {Object.<string,msg.IMapFightInfo>|null} [new_fight_info] NewFightInfo new_fight_info
         */

        /**
         * Constructs a new NewFightInfo.
         * @memberof msg
         * @classdesc Represents a NewFightInfo.
         * @implements INewFightInfo
         * @constructor
         * @param {msg.INewFightInfo=} [properties] Properties to set
         */
        function NewFightInfo(properties) {
            this.new_fight_info = {};
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * NewFightInfo current_step.
         * @member {number} current_step
         * @memberof msg.NewFightInfo
         * @instance
         */
        NewFightInfo.prototype.current_step = 0;

        /**
         * NewFightInfo new_fight_info.
         * @member {Object.<string,msg.IMapFightInfo>} new_fight_info
         * @memberof msg.NewFightInfo
         * @instance
         */
        NewFightInfo.prototype.new_fight_info = $util.emptyObject;

        /**
         * Creates a new NewFightInfo instance using the specified properties.
         * @function create
         * @memberof msg.NewFightInfo
         * @static
         * @param {msg.INewFightInfo=} [properties] Properties to set
         * @returns {msg.NewFightInfo} NewFightInfo instance
         */
        NewFightInfo.create = function create(properties) {
            return new NewFightInfo(properties);
        };

        /**
         * Encodes the specified NewFightInfo message. Does not implicitly {@link msg.NewFightInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.NewFightInfo
         * @static
         * @param {msg.INewFightInfo} message NewFightInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        NewFightInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.current_step != null && Object.hasOwnProperty.call(message, "current_step"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.current_step);
            if (message.new_fight_info != null && Object.hasOwnProperty.call(message, "new_fight_info"))
                for (var keys = Object.keys(message.new_fight_info), i = 0; i < keys.length; ++i) {
                    writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]);
                    $root.msg.MapFightInfo.encode(message.new_fight_info[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
                }
            return writer;
        };

        /**
         * Encodes the specified NewFightInfo message, length delimited. Does not implicitly {@link msg.NewFightInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.NewFightInfo
         * @static
         * @param {msg.INewFightInfo} message NewFightInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        NewFightInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a NewFightInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.NewFightInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.NewFightInfo} NewFightInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        NewFightInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.NewFightInfo(), key, value;
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.current_step = reader.int32();
                    break;
                case 2:
                    if (message.new_fight_info === $util.emptyObject)
                        message.new_fight_info = {};
                    var end2 = reader.uint32() + reader.pos;
                    key = 0;
                    value = null;
                    while (reader.pos < end2) {
                        var tag2 = reader.uint32();
                        switch (tag2 >>> 3) {
                        case 1:
                            key = reader.int32();
                            break;
                        case 2:
                            value = $root.msg.MapFightInfo.decode(reader, reader.uint32());
                            break;
                        default:
                            reader.skipType(tag2 & 7);
                            break;
                        }
                    }
                    message.new_fight_info[key] = value;
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a NewFightInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.NewFightInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.NewFightInfo} NewFightInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        NewFightInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a NewFightInfo message.
         * @function verify
         * @memberof msg.NewFightInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        NewFightInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.current_step != null && message.hasOwnProperty("current_step"))
                if (!$util.isInteger(message.current_step))
                    return "current_step: integer expected";
            if (message.new_fight_info != null && message.hasOwnProperty("new_fight_info")) {
                if (!$util.isObject(message.new_fight_info))
                    return "new_fight_info: object expected";
                var key = Object.keys(message.new_fight_info);
                for (var i = 0; i < key.length; ++i) {
                    if (!$util.key32Re.test(key[i]))
                        return "new_fight_info: integer key{k:int32} expected";
                    {
                        var error = $root.msg.MapFightInfo.verify(message.new_fight_info[key[i]]);
                        if (error)
                            return "new_fight_info." + error;
                    }
                }
            }
            return null;
        };

        return NewFightInfo;
    })();

    msg.ResultToClient = (function() {

        /**
         * Properties of a ResultToClient.
         * @memberof msg
         * @interface IResultToClient
         * @property {number|null} [result_odds] ResultToClient result_odds
         * @property {number|Long|null} [result_money] ResultToClient result_money
         */

        /**
         * Constructs a new ResultToClient.
         * @memberof msg
         * @classdesc Represents a ResultToClient.
         * @implements IResultToClient
         * @constructor
         * @param {msg.IResultToClient=} [properties] Properties to set
         */
        function ResultToClient(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * ResultToClient result_odds.
         * @member {number} result_odds
         * @memberof msg.ResultToClient
         * @instance
         */
        ResultToClient.prototype.result_odds = 0;

        /**
         * ResultToClient result_money.
         * @member {number|Long} result_money
         * @memberof msg.ResultToClient
         * @instance
         */
        ResultToClient.prototype.result_money = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Creates a new ResultToClient instance using the specified properties.
         * @function create
         * @memberof msg.ResultToClient
         * @static
         * @param {msg.IResultToClient=} [properties] Properties to set
         * @returns {msg.ResultToClient} ResultToClient instance
         */
        ResultToClient.create = function create(properties) {
            return new ResultToClient(properties);
        };

        /**
         * Encodes the specified ResultToClient message. Does not implicitly {@link msg.ResultToClient.verify|verify} messages.
         * @function encode
         * @memberof msg.ResultToClient
         * @static
         * @param {msg.IResultToClient} message ResultToClient message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ResultToClient.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.result_odds != null && Object.hasOwnProperty.call(message, "result_odds"))
                writer.uint32(/* id 1, wireType 1 =*/9).double(message.result_odds);
            if (message.result_money != null && Object.hasOwnProperty.call(message, "result_money"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.result_money);
            return writer;
        };

        /**
         * Encodes the specified ResultToClient message, length delimited. Does not implicitly {@link msg.ResultToClient.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.ResultToClient
         * @static
         * @param {msg.IResultToClient} message ResultToClient message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ResultToClient.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ResultToClient message from the specified reader or buffer.
         * @function decode
         * @memberof msg.ResultToClient
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.ResultToClient} ResultToClient
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ResultToClient.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.ResultToClient();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.result_odds = reader.double();
                    break;
                case 2:
                    message.result_money = reader.int64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ResultToClient message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.ResultToClient
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.ResultToClient} ResultToClient
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ResultToClient.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ResultToClient message.
         * @function verify
         * @memberof msg.ResultToClient
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ResultToClient.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.result_odds != null && message.hasOwnProperty("result_odds"))
                if (typeof message.result_odds !== "number")
                    return "result_odds: number expected";
            if (message.result_money != null && message.hasOwnProperty("result_money"))
                if (!$util.isInteger(message.result_money) && !(message.result_money && $util.isInteger(message.result_money.low) && $util.isInteger(message.result_money.high)))
                    return "result_money: integer|Long expected";
            return null;
        };

        return ResultToClient;
    })();

    msg.SeeSomeHeroInfo = (function() {

        /**
         * Properties of a SeeSomeHeroInfo.
         * @memberof msg
         * @interface ISeeSomeHeroInfo
         * @property {number|null} [user_id] SeeSomeHeroInfo user_id
         * @property {number|null} [hero_id] SeeSomeHeroInfo hero_id
         */

        /**
         * Constructs a new SeeSomeHeroInfo.
         * @memberof msg
         * @classdesc Represents a SeeSomeHeroInfo.
         * @implements ISeeSomeHeroInfo
         * @constructor
         * @param {msg.ISeeSomeHeroInfo=} [properties] Properties to set
         */
        function SeeSomeHeroInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SeeSomeHeroInfo user_id.
         * @member {number} user_id
         * @memberof msg.SeeSomeHeroInfo
         * @instance
         */
        SeeSomeHeroInfo.prototype.user_id = 0;

        /**
         * SeeSomeHeroInfo hero_id.
         * @member {number} hero_id
         * @memberof msg.SeeSomeHeroInfo
         * @instance
         */
        SeeSomeHeroInfo.prototype.hero_id = 0;

        /**
         * Creates a new SeeSomeHeroInfo instance using the specified properties.
         * @function create
         * @memberof msg.SeeSomeHeroInfo
         * @static
         * @param {msg.ISeeSomeHeroInfo=} [properties] Properties to set
         * @returns {msg.SeeSomeHeroInfo} SeeSomeHeroInfo instance
         */
        SeeSomeHeroInfo.create = function create(properties) {
            return new SeeSomeHeroInfo(properties);
        };

        /**
         * Encodes the specified SeeSomeHeroInfo message. Does not implicitly {@link msg.SeeSomeHeroInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.SeeSomeHeroInfo
         * @static
         * @param {msg.ISeeSomeHeroInfo} message SeeSomeHeroInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SeeSomeHeroInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.user_id != null && Object.hasOwnProperty.call(message, "user_id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.user_id);
            if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hero_id);
            return writer;
        };

        /**
         * Encodes the specified SeeSomeHeroInfo message, length delimited. Does not implicitly {@link msg.SeeSomeHeroInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.SeeSomeHeroInfo
         * @static
         * @param {msg.ISeeSomeHeroInfo} message SeeSomeHeroInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SeeSomeHeroInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SeeSomeHeroInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.SeeSomeHeroInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.SeeSomeHeroInfo} SeeSomeHeroInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SeeSomeHeroInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.SeeSomeHeroInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.user_id = reader.int32();
                    break;
                case 2:
                    message.hero_id = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a SeeSomeHeroInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.SeeSomeHeroInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.SeeSomeHeroInfo} SeeSomeHeroInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SeeSomeHeroInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SeeSomeHeroInfo message.
         * @function verify
         * @memberof msg.SeeSomeHeroInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SeeSomeHeroInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.user_id != null && message.hasOwnProperty("user_id"))
                if (!$util.isInteger(message.user_id))
                    return "user_id: integer expected";
            if (message.hero_id != null && message.hasOwnProperty("hero_id"))
                if (!$util.isInteger(message.hero_id))
                    return "hero_id: integer expected";
            return null;
        };

        return SeeSomeHeroInfo;
    })();

    msg.HeroShowInfo = (function() {

        /**
         * Properties of a HeroShowInfo.
         * @memberof msg
         * @interface IHeroShowInfo
         * @property {number|null} [hero_id] HeroShowInfo hero_id
         * @property {string|null} [hero_name] HeroShowInfo hero_name
         * @property {number|null} [hero_character] HeroShowInfo hero_character
         * @property {number|null} [hero_skill] HeroShowInfo hero_skill
         * @property {number|null} [hero_win_num] HeroShowInfo hero_win_num
         * @property {number|null} [hero_lose_num] HeroShowInfo hero_lose_num
         * @property {number|null} [hero_champion_num] HeroShowInfo hero_champion_num
         * @property {number|null} [hero_win_rate] HeroShowInfo hero_win_rate
         * @property {boolean|null} [user_can_wager] HeroShowInfo user_can_wager
         * @property {number|Long|null} [user_money] HeroShowInfo user_money
         * @property {number|Long|null} [hero_money] HeroShowInfo hero_money
         */

        /**
         * Constructs a new HeroShowInfo.
         * @memberof msg
         * @classdesc Represents a HeroShowInfo.
         * @implements IHeroShowInfo
         * @constructor
         * @param {msg.IHeroShowInfo=} [properties] Properties to set
         */
        function HeroShowInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * HeroShowInfo hero_id.
         * @member {number} hero_id
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_id = 0;

        /**
         * HeroShowInfo hero_name.
         * @member {string} hero_name
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_name = "";

        /**
         * HeroShowInfo hero_character.
         * @member {number} hero_character
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_character = 0;

        /**
         * HeroShowInfo hero_skill.
         * @member {number} hero_skill
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_skill = 0;

        /**
         * HeroShowInfo hero_win_num.
         * @member {number} hero_win_num
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_win_num = 0;

        /**
         * HeroShowInfo hero_lose_num.
         * @member {number} hero_lose_num
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_lose_num = 0;

        /**
         * HeroShowInfo hero_champion_num.
         * @member {number} hero_champion_num
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_champion_num = 0;

        /**
         * HeroShowInfo hero_win_rate.
         * @member {number} hero_win_rate
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_win_rate = 0;

        /**
         * HeroShowInfo user_can_wager.
         * @member {boolean} user_can_wager
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.user_can_wager = false;

        /**
         * HeroShowInfo user_money.
         * @member {number|Long} user_money
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.user_money = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * HeroShowInfo hero_money.
         * @member {number|Long} hero_money
         * @memberof msg.HeroShowInfo
         * @instance
         */
        HeroShowInfo.prototype.hero_money = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Creates a new HeroShowInfo instance using the specified properties.
         * @function create
         * @memberof msg.HeroShowInfo
         * @static
         * @param {msg.IHeroShowInfo=} [properties] Properties to set
         * @returns {msg.HeroShowInfo} HeroShowInfo instance
         */
        HeroShowInfo.create = function create(properties) {
            return new HeroShowInfo(properties);
        };

        /**
         * Encodes the specified HeroShowInfo message. Does not implicitly {@link msg.HeroShowInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.HeroShowInfo
         * @static
         * @param {msg.IHeroShowInfo} message HeroShowInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        HeroShowInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hero_id);
            if (message.hero_name != null && Object.hasOwnProperty.call(message, "hero_name"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.hero_name);
            if (message.hero_character != null && Object.hasOwnProperty.call(message, "hero_character"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.hero_character);
            if (message.hero_skill != null && Object.hasOwnProperty.call(message, "hero_skill"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hero_skill);
            if (message.hero_win_num != null && Object.hasOwnProperty.call(message, "hero_win_num"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.hero_win_num);
            if (message.hero_lose_num != null && Object.hasOwnProperty.call(message, "hero_lose_num"))
                writer.uint32(/* id 6, wireType 0 =*/48).int32(message.hero_lose_num);
            if (message.hero_champion_num != null && Object.hasOwnProperty.call(message, "hero_champion_num"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.hero_champion_num);
            if (message.hero_win_rate != null && Object.hasOwnProperty.call(message, "hero_win_rate"))
                writer.uint32(/* id 8, wireType 1 =*/65).double(message.hero_win_rate);
            if (message.user_can_wager != null && Object.hasOwnProperty.call(message, "user_can_wager"))
                writer.uint32(/* id 9, wireType 0 =*/72).bool(message.user_can_wager);
            if (message.user_money != null && Object.hasOwnProperty.call(message, "user_money"))
                writer.uint32(/* id 10, wireType 0 =*/80).int64(message.user_money);
            if (message.hero_money != null && Object.hasOwnProperty.call(message, "hero_money"))
                writer.uint32(/* id 11, wireType 0 =*/88).int64(message.hero_money);
            return writer;
        };

        /**
         * Encodes the specified HeroShowInfo message, length delimited. Does not implicitly {@link msg.HeroShowInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.HeroShowInfo
         * @static
         * @param {msg.IHeroShowInfo} message HeroShowInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        HeroShowInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a HeroShowInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.HeroShowInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.HeroShowInfo} HeroShowInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        HeroShowInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.HeroShowInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.hero_id = reader.int32();
                    break;
                case 2:
                    message.hero_name = reader.string();
                    break;
                case 3:
                    message.hero_character = reader.int32();
                    break;
                case 4:
                    message.hero_skill = reader.int32();
                    break;
                case 5:
                    message.hero_win_num = reader.int32();
                    break;
                case 6:
                    message.hero_lose_num = reader.int32();
                    break;
                case 7:
                    message.hero_champion_num = reader.int32();
                    break;
                case 8:
                    message.hero_win_rate = reader.double();
                    break;
                case 9:
                    message.user_can_wager = reader.bool();
                    break;
                case 10:
                    message.user_money = reader.int64();
                    break;
                case 11:
                    message.hero_money = reader.int64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a HeroShowInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.HeroShowInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.HeroShowInfo} HeroShowInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        HeroShowInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a HeroShowInfo message.
         * @function verify
         * @memberof msg.HeroShowInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        HeroShowInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.hero_id != null && message.hasOwnProperty("hero_id"))
                if (!$util.isInteger(message.hero_id))
                    return "hero_id: integer expected";
            if (message.hero_name != null && message.hasOwnProperty("hero_name"))
                if (!$util.isString(message.hero_name))
                    return "hero_name: string expected";
            if (message.hero_character != null && message.hasOwnProperty("hero_character"))
                if (!$util.isInteger(message.hero_character))
                    return "hero_character: integer expected";
            if (message.hero_skill != null && message.hasOwnProperty("hero_skill"))
                if (!$util.isInteger(message.hero_skill))
                    return "hero_skill: integer expected";
            if (message.hero_win_num != null && message.hasOwnProperty("hero_win_num"))
                if (!$util.isInteger(message.hero_win_num))
                    return "hero_win_num: integer expected";
            if (message.hero_lose_num != null && message.hasOwnProperty("hero_lose_num"))
                if (!$util.isInteger(message.hero_lose_num))
                    return "hero_lose_num: integer expected";
            if (message.hero_champion_num != null && message.hasOwnProperty("hero_champion_num"))
                if (!$util.isInteger(message.hero_champion_num))
                    return "hero_champion_num: integer expected";
            if (message.hero_win_rate != null && message.hasOwnProperty("hero_win_rate"))
                if (typeof message.hero_win_rate !== "number")
                    return "hero_win_rate: number expected";
            if (message.user_can_wager != null && message.hasOwnProperty("user_can_wager"))
                if (typeof message.user_can_wager !== "boolean")
                    return "user_can_wager: boolean expected";
            if (message.user_money != null && message.hasOwnProperty("user_money"))
                if (!$util.isInteger(message.user_money) && !(message.user_money && $util.isInteger(message.user_money.low) && $util.isInteger(message.user_money.high)))
                    return "user_money: integer|Long expected";
            if (message.hero_money != null && message.hasOwnProperty("hero_money"))
                if (!$util.isInteger(message.hero_money) && !(message.hero_money && $util.isInteger(message.hero_money.low) && $util.isInteger(message.hero_money.high)))
                    return "hero_money: integer|Long expected";
            return null;
        };

        return HeroShowInfo;
    })();

    msg.ChampionHistoryRequest = (function() {

        /**
         * Properties of a ChampionHistoryRequest.
         * @memberof msg
         * @interface IChampionHistoryRequest
         * @property {number|null} [select_page] ChampionHistoryRequest select_page
         */

        /**
         * Constructs a new ChampionHistoryRequest.
         * @memberof msg
         * @classdesc Represents a ChampionHistoryRequest.
         * @implements IChampionHistoryRequest
         * @constructor
         * @param {msg.IChampionHistoryRequest=} [properties] Properties to set
         */
        function ChampionHistoryRequest(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * ChampionHistoryRequest select_page.
         * @member {number} select_page
         * @memberof msg.ChampionHistoryRequest
         * @instance
         */
        ChampionHistoryRequest.prototype.select_page = 0;

        /**
         * Creates a new ChampionHistoryRequest instance using the specified properties.
         * @function create
         * @memberof msg.ChampionHistoryRequest
         * @static
         * @param {msg.IChampionHistoryRequest=} [properties] Properties to set
         * @returns {msg.ChampionHistoryRequest} ChampionHistoryRequest instance
         */
        ChampionHistoryRequest.create = function create(properties) {
            return new ChampionHistoryRequest(properties);
        };

        /**
         * Encodes the specified ChampionHistoryRequest message. Does not implicitly {@link msg.ChampionHistoryRequest.verify|verify} messages.
         * @function encode
         * @memberof msg.ChampionHistoryRequest
         * @static
         * @param {msg.IChampionHistoryRequest} message ChampionHistoryRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ChampionHistoryRequest.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.select_page != null && Object.hasOwnProperty.call(message, "select_page"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.select_page);
            return writer;
        };

        /**
         * Encodes the specified ChampionHistoryRequest message, length delimited. Does not implicitly {@link msg.ChampionHistoryRequest.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.ChampionHistoryRequest
         * @static
         * @param {msg.IChampionHistoryRequest} message ChampionHistoryRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ChampionHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ChampionHistoryRequest message from the specified reader or buffer.
         * @function decode
         * @memberof msg.ChampionHistoryRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.ChampionHistoryRequest} ChampionHistoryRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ChampionHistoryRequest.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.ChampionHistoryRequest();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.select_page = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ChampionHistoryRequest message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.ChampionHistoryRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.ChampionHistoryRequest} ChampionHistoryRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ChampionHistoryRequest.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ChampionHistoryRequest message.
         * @function verify
         * @memberof msg.ChampionHistoryRequest
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ChampionHistoryRequest.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.select_page != null && message.hasOwnProperty("select_page"))
                if (!$util.isInteger(message.select_page))
                    return "select_page: integer expected";
            return null;
        };

        return ChampionHistoryRequest;
    })();

    msg.ChampionHistoryResponse = (function() {

        /**
         * Properties of a ChampionHistoryResponse.
         * @memberof msg
         * @interface IChampionHistoryResponse
         * @property {number|null} [max_page] ChampionHistoryResponse max_page
         * @property {Array.<msg.IChampionHistoryInfo>|null} [data] ChampionHistoryResponse data
         */

        /**
         * Constructs a new ChampionHistoryResponse.
         * @memberof msg
         * @classdesc Represents a ChampionHistoryResponse.
         * @implements IChampionHistoryResponse
         * @constructor
         * @param {msg.IChampionHistoryResponse=} [properties] Properties to set
         */
        function ChampionHistoryResponse(properties) {
            this.data = [];
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * ChampionHistoryResponse max_page.
         * @member {number} max_page
         * @memberof msg.ChampionHistoryResponse
         * @instance
         */
        ChampionHistoryResponse.prototype.max_page = 0;

        /**
         * ChampionHistoryResponse data.
         * @member {Array.<msg.IChampionHistoryInfo>} data
         * @memberof msg.ChampionHistoryResponse
         * @instance
         */
        ChampionHistoryResponse.prototype.data = $util.emptyArray;

        /**
         * Creates a new ChampionHistoryResponse instance using the specified properties.
         * @function create
         * @memberof msg.ChampionHistoryResponse
         * @static
         * @param {msg.IChampionHistoryResponse=} [properties] Properties to set
         * @returns {msg.ChampionHistoryResponse} ChampionHistoryResponse instance
         */
        ChampionHistoryResponse.create = function create(properties) {
            return new ChampionHistoryResponse(properties);
        };

        /**
         * Encodes the specified ChampionHistoryResponse message. Does not implicitly {@link msg.ChampionHistoryResponse.verify|verify} messages.
         * @function encode
         * @memberof msg.ChampionHistoryResponse
         * @static
         * @param {msg.IChampionHistoryResponse} message ChampionHistoryResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ChampionHistoryResponse.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.max_page != null && Object.hasOwnProperty.call(message, "max_page"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.max_page);
            if (message.data != null && message.data.length)
                for (var i = 0; i < message.data.length; ++i)
                    $root.msg.ChampionHistoryInfo.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified ChampionHistoryResponse message, length delimited. Does not implicitly {@link msg.ChampionHistoryResponse.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.ChampionHistoryResponse
         * @static
         * @param {msg.IChampionHistoryResponse} message ChampionHistoryResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ChampionHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ChampionHistoryResponse message from the specified reader or buffer.
         * @function decode
         * @memberof msg.ChampionHistoryResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.ChampionHistoryResponse} ChampionHistoryResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ChampionHistoryResponse.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.ChampionHistoryResponse();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.max_page = reader.int32();
                    break;
                case 2:
                    if (!(message.data && message.data.length))
                        message.data = [];
                    message.data.push($root.msg.ChampionHistoryInfo.decode(reader, reader.uint32()));
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ChampionHistoryResponse message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.ChampionHistoryResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.ChampionHistoryResponse} ChampionHistoryResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ChampionHistoryResponse.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ChampionHistoryResponse message.
         * @function verify
         * @memberof msg.ChampionHistoryResponse
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ChampionHistoryResponse.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.max_page != null && message.hasOwnProperty("max_page"))
                if (!$util.isInteger(message.max_page))
                    return "max_page: integer expected";
            if (message.data != null && message.hasOwnProperty("data")) {
                if (!Array.isArray(message.data))
                    return "data: array expected";
                for (var i = 0; i < message.data.length; ++i) {
                    var error = $root.msg.ChampionHistoryInfo.verify(message.data[i]);
                    if (error)
                        return "data." + error;
                }
            }
            return null;
        };

        return ChampionHistoryResponse;
    })();

    msg.ChampionHistoryInfo = (function() {

        /**
         * Properties of a ChampionHistoryInfo.
         * @memberof msg
         * @interface IChampionHistoryInfo
         * @property {string|null} [champion_name] ChampionHistoryInfo champion_name
         * @property {number|null} [champion_odds] ChampionHistoryInfo champion_odds
         */

        /**
         * Constructs a new ChampionHistoryInfo.
         * @memberof msg
         * @classdesc Represents a ChampionHistoryInfo.
         * @implements IChampionHistoryInfo
         * @constructor
         * @param {msg.IChampionHistoryInfo=} [properties] Properties to set
         */
        function ChampionHistoryInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * ChampionHistoryInfo champion_name.
         * @member {string} champion_name
         * @memberof msg.ChampionHistoryInfo
         * @instance
         */
        ChampionHistoryInfo.prototype.champion_name = "";

        /**
         * ChampionHistoryInfo champion_odds.
         * @member {number} champion_odds
         * @memberof msg.ChampionHistoryInfo
         * @instance
         */
        ChampionHistoryInfo.prototype.champion_odds = 0;

        /**
         * Creates a new ChampionHistoryInfo instance using the specified properties.
         * @function create
         * @memberof msg.ChampionHistoryInfo
         * @static
         * @param {msg.IChampionHistoryInfo=} [properties] Properties to set
         * @returns {msg.ChampionHistoryInfo} ChampionHistoryInfo instance
         */
        ChampionHistoryInfo.create = function create(properties) {
            return new ChampionHistoryInfo(properties);
        };

        /**
         * Encodes the specified ChampionHistoryInfo message. Does not implicitly {@link msg.ChampionHistoryInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.ChampionHistoryInfo
         * @static
         * @param {msg.IChampionHistoryInfo} message ChampionHistoryInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ChampionHistoryInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.champion_name != null && Object.hasOwnProperty.call(message, "champion_name"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.champion_name);
            if (message.champion_odds != null && Object.hasOwnProperty.call(message, "champion_odds"))
                writer.uint32(/* id 3, wireType 1 =*/25).double(message.champion_odds);
            return writer;
        };

        /**
         * Encodes the specified ChampionHistoryInfo message, length delimited. Does not implicitly {@link msg.ChampionHistoryInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.ChampionHistoryInfo
         * @static
         * @param {msg.IChampionHistoryInfo} message ChampionHistoryInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ChampionHistoryInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ChampionHistoryInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.ChampionHistoryInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.ChampionHistoryInfo} ChampionHistoryInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ChampionHistoryInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.ChampionHistoryInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 2:
                    message.champion_name = reader.string();
                    break;
                case 3:
                    message.champion_odds = reader.double();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ChampionHistoryInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.ChampionHistoryInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.ChampionHistoryInfo} ChampionHistoryInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ChampionHistoryInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ChampionHistoryInfo message.
         * @function verify
         * @memberof msg.ChampionHistoryInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ChampionHistoryInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.champion_name != null && message.hasOwnProperty("champion_name"))
                if (!$util.isString(message.champion_name))
                    return "champion_name: string expected";
            if (message.champion_odds != null && message.hasOwnProperty("champion_odds"))
                if (typeof message.champion_odds !== "number")
                    return "champion_odds: number expected";
            return null;
        };

        return ChampionHistoryInfo;
    })();

    msg.UserWagerRequest = (function() {

        /**
         * Properties of a UserWagerRequest.
         * @memberof msg
         * @interface IUserWagerRequest
         * @property {number|null} [user_id] UserWagerRequest user_id
         * @property {number|null} [hero_id] UserWagerRequest hero_id
         * @property {number|Long|null} [wager_money] UserWagerRequest wager_money
         */

        /**
         * Constructs a new UserWagerRequest.
         * @memberof msg
         * @classdesc Represents a UserWagerRequest.
         * @implements IUserWagerRequest
         * @constructor
         * @param {msg.IUserWagerRequest=} [properties] Properties to set
         */
        function UserWagerRequest(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UserWagerRequest user_id.
         * @member {number} user_id
         * @memberof msg.UserWagerRequest
         * @instance
         */
        UserWagerRequest.prototype.user_id = 0;

        /**
         * UserWagerRequest hero_id.
         * @member {number} hero_id
         * @memberof msg.UserWagerRequest
         * @instance
         */
        UserWagerRequest.prototype.hero_id = 0;

        /**
         * UserWagerRequest wager_money.
         * @member {number|Long} wager_money
         * @memberof msg.UserWagerRequest
         * @instance
         */
        UserWagerRequest.prototype.wager_money = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Creates a new UserWagerRequest instance using the specified properties.
         * @function create
         * @memberof msg.UserWagerRequest
         * @static
         * @param {msg.IUserWagerRequest=} [properties] Properties to set
         * @returns {msg.UserWagerRequest} UserWagerRequest instance
         */
        UserWagerRequest.create = function create(properties) {
            return new UserWagerRequest(properties);
        };

        /**
         * Encodes the specified UserWagerRequest message. Does not implicitly {@link msg.UserWagerRequest.verify|verify} messages.
         * @function encode
         * @memberof msg.UserWagerRequest
         * @static
         * @param {msg.IUserWagerRequest} message UserWagerRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWagerRequest.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.user_id != null && Object.hasOwnProperty.call(message, "user_id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.user_id);
            if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hero_id);
            if (message.wager_money != null && Object.hasOwnProperty.call(message, "wager_money"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.wager_money);
            return writer;
        };

        /**
         * Encodes the specified UserWagerRequest message, length delimited. Does not implicitly {@link msg.UserWagerRequest.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.UserWagerRequest
         * @static
         * @param {msg.IUserWagerRequest} message UserWagerRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWagerRequest.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserWagerRequest message from the specified reader or buffer.
         * @function decode
         * @memberof msg.UserWagerRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.UserWagerRequest} UserWagerRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWagerRequest.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserWagerRequest();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.user_id = reader.int32();
                    break;
                case 2:
                    message.hero_id = reader.int32();
                    break;
                case 3:
                    message.wager_money = reader.int64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserWagerRequest message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.UserWagerRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.UserWagerRequest} UserWagerRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWagerRequest.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserWagerRequest message.
         * @function verify
         * @memberof msg.UserWagerRequest
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserWagerRequest.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.user_id != null && message.hasOwnProperty("user_id"))
                if (!$util.isInteger(message.user_id))
                    return "user_id: integer expected";
            if (message.hero_id != null && message.hasOwnProperty("hero_id"))
                if (!$util.isInteger(message.hero_id))
                    return "hero_id: integer expected";
            if (message.wager_money != null && message.hasOwnProperty("wager_money"))
                if (!$util.isInteger(message.wager_money) && !(message.wager_money && $util.isInteger(message.wager_money.low) && $util.isInteger(message.wager_money.high)))
                    return "wager_money: integer|Long expected";
            return null;
        };

        return UserWagerRequest;
    })();

    msg.UserWagerResponse = (function() {

        /**
         * Properties of a UserWagerResponse.
         * @memberof msg
         * @interface IUserWagerResponse
         * @property {number|null} [Code] UserWagerResponse Code
         * @property {msg.IUserWagerToClient|null} [responseInfo] UserWagerResponse responseInfo
         */

        /**
         * Constructs a new UserWagerResponse.
         * @memberof msg
         * @classdesc Represents a UserWagerResponse.
         * @implements IUserWagerResponse
         * @constructor
         * @param {msg.IUserWagerResponse=} [properties] Properties to set
         */
        function UserWagerResponse(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UserWagerResponse Code.
         * @member {number} Code
         * @memberof msg.UserWagerResponse
         * @instance
         */
        UserWagerResponse.prototype.Code = 0;

        /**
         * UserWagerResponse responseInfo.
         * @member {msg.IUserWagerToClient|null|undefined} responseInfo
         * @memberof msg.UserWagerResponse
         * @instance
         */
        UserWagerResponse.prototype.responseInfo = null;

        /**
         * Creates a new UserWagerResponse instance using the specified properties.
         * @function create
         * @memberof msg.UserWagerResponse
         * @static
         * @param {msg.IUserWagerResponse=} [properties] Properties to set
         * @returns {msg.UserWagerResponse} UserWagerResponse instance
         */
        UserWagerResponse.create = function create(properties) {
            return new UserWagerResponse(properties);
        };

        /**
         * Encodes the specified UserWagerResponse message. Does not implicitly {@link msg.UserWagerResponse.verify|verify} messages.
         * @function encode
         * @memberof msg.UserWagerResponse
         * @static
         * @param {msg.IUserWagerResponse} message UserWagerResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWagerResponse.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.Code != null && Object.hasOwnProperty.call(message, "Code"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.Code);
            if (message.responseInfo != null && Object.hasOwnProperty.call(message, "responseInfo"))
                $root.msg.UserWagerToClient.encode(message.responseInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified UserWagerResponse message, length delimited. Does not implicitly {@link msg.UserWagerResponse.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.UserWagerResponse
         * @static
         * @param {msg.IUserWagerResponse} message UserWagerResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWagerResponse.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserWagerResponse message from the specified reader or buffer.
         * @function decode
         * @memberof msg.UserWagerResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.UserWagerResponse} UserWagerResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWagerResponse.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserWagerResponse();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.Code = reader.int32();
                    break;
                case 2:
                    message.responseInfo = $root.msg.UserWagerToClient.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserWagerResponse message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.UserWagerResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.UserWagerResponse} UserWagerResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWagerResponse.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserWagerResponse message.
         * @function verify
         * @memberof msg.UserWagerResponse
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserWagerResponse.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.Code != null && message.hasOwnProperty("Code"))
                if (!$util.isInteger(message.Code))
                    return "Code: integer expected";
            if (message.responseInfo != null && message.hasOwnProperty("responseInfo")) {
                var error = $root.msg.UserWagerToClient.verify(message.responseInfo);
                if (error)
                    return "responseInfo." + error;
            }
            return null;
        };

        return UserWagerResponse;
    })();

    msg.UserWagerToClient = (function() {

        /**
         * Properties of a UserWagerToClient.
         * @memberof msg
         * @interface IUserWagerToClient
         * @property {number|null} [hero_id] UserWagerToClient hero_id
         * @property {number|Long|null} [hero_money] UserWagerToClient hero_money
         * @property {number|Long|null} [user_money] UserWagerToClient user_money
         * @property {number|null} [hero_odds] UserWagerToClient hero_odds
         */

        /**
         * Constructs a new UserWagerToClient.
         * @memberof msg
         * @classdesc Represents a UserWagerToClient.
         * @implements IUserWagerToClient
         * @constructor
         * @param {msg.IUserWagerToClient=} [properties] Properties to set
         */
        function UserWagerToClient(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UserWagerToClient hero_id.
         * @member {number} hero_id
         * @memberof msg.UserWagerToClient
         * @instance
         */
        UserWagerToClient.prototype.hero_id = 0;

        /**
         * UserWagerToClient hero_money.
         * @member {number|Long} hero_money
         * @memberof msg.UserWagerToClient
         * @instance
         */
        UserWagerToClient.prototype.hero_money = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * UserWagerToClient user_money.
         * @member {number|Long} user_money
         * @memberof msg.UserWagerToClient
         * @instance
         */
        UserWagerToClient.prototype.user_money = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * UserWagerToClient hero_odds.
         * @member {number} hero_odds
         * @memberof msg.UserWagerToClient
         * @instance
         */
        UserWagerToClient.prototype.hero_odds = 0;

        /**
         * Creates a new UserWagerToClient instance using the specified properties.
         * @function create
         * @memberof msg.UserWagerToClient
         * @static
         * @param {msg.IUserWagerToClient=} [properties] Properties to set
         * @returns {msg.UserWagerToClient} UserWagerToClient instance
         */
        UserWagerToClient.create = function create(properties) {
            return new UserWagerToClient(properties);
        };

        /**
         * Encodes the specified UserWagerToClient message. Does not implicitly {@link msg.UserWagerToClient.verify|verify} messages.
         * @function encode
         * @memberof msg.UserWagerToClient
         * @static
         * @param {msg.IUserWagerToClient} message UserWagerToClient message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWagerToClient.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hero_id);
            if (message.hero_money != null && Object.hasOwnProperty.call(message, "hero_money"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.hero_money);
            if (message.user_money != null && Object.hasOwnProperty.call(message, "user_money"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.user_money);
            if (message.hero_odds != null && Object.hasOwnProperty.call(message, "hero_odds"))
                writer.uint32(/* id 4, wireType 1 =*/33).double(message.hero_odds);
            return writer;
        };

        /**
         * Encodes the specified UserWagerToClient message, length delimited. Does not implicitly {@link msg.UserWagerToClient.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.UserWagerToClient
         * @static
         * @param {msg.IUserWagerToClient} message UserWagerToClient message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWagerToClient.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserWagerToClient message from the specified reader or buffer.
         * @function decode
         * @memberof msg.UserWagerToClient
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.UserWagerToClient} UserWagerToClient
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWagerToClient.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserWagerToClient();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.hero_id = reader.int32();
                    break;
                case 2:
                    message.hero_money = reader.int64();
                    break;
                case 3:
                    message.user_money = reader.int64();
                    break;
                case 4:
                    message.hero_odds = reader.double();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserWagerToClient message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.UserWagerToClient
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.UserWagerToClient} UserWagerToClient
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWagerToClient.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserWagerToClient message.
         * @function verify
         * @memberof msg.UserWagerToClient
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserWagerToClient.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.hero_id != null && message.hasOwnProperty("hero_id"))
                if (!$util.isInteger(message.hero_id))
                    return "hero_id: integer expected";
            if (message.hero_money != null && message.hasOwnProperty("hero_money"))
                if (!$util.isInteger(message.hero_money) && !(message.hero_money && $util.isInteger(message.hero_money.low) && $util.isInteger(message.hero_money.high)))
                    return "hero_money: integer|Long expected";
            if (message.user_money != null && message.hasOwnProperty("user_money"))
                if (!$util.isInteger(message.user_money) && !(message.user_money && $util.isInteger(message.user_money.low) && $util.isInteger(message.user_money.high)))
                    return "user_money: integer|Long expected";
            if (message.hero_odds != null && message.hasOwnProperty("hero_odds"))
                if (typeof message.hero_odds !== "number")
                    return "hero_odds: number expected";
            return null;
        };

        return UserWagerToClient;
    })();

    msg.UpdateOdds = (function() {

        /**
         * Properties of an UpdateOdds.
         * @memberof msg
         * @interface IUpdateOdds
         * @property {number|null} [hero_id] UpdateOdds hero_id
         * @property {number|null} [hero_odds] UpdateOdds hero_odds
         */

        /**
         * Constructs a new UpdateOdds.
         * @memberof msg
         * @classdesc Represents an UpdateOdds.
         * @implements IUpdateOdds
         * @constructor
         * @param {msg.IUpdateOdds=} [properties] Properties to set
         */
        function UpdateOdds(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UpdateOdds hero_id.
         * @member {number} hero_id
         * @memberof msg.UpdateOdds
         * @instance
         */
        UpdateOdds.prototype.hero_id = 0;

        /**
         * UpdateOdds hero_odds.
         * @member {number} hero_odds
         * @memberof msg.UpdateOdds
         * @instance
         */
        UpdateOdds.prototype.hero_odds = 0;

        /**
         * Creates a new UpdateOdds instance using the specified properties.
         * @function create
         * @memberof msg.UpdateOdds
         * @static
         * @param {msg.IUpdateOdds=} [properties] Properties to set
         * @returns {msg.UpdateOdds} UpdateOdds instance
         */
        UpdateOdds.create = function create(properties) {
            return new UpdateOdds(properties);
        };

        /**
         * Encodes the specified UpdateOdds message. Does not implicitly {@link msg.UpdateOdds.verify|verify} messages.
         * @function encode
         * @memberof msg.UpdateOdds
         * @static
         * @param {msg.IUpdateOdds} message UpdateOdds message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UpdateOdds.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hero_id);
            if (message.hero_odds != null && Object.hasOwnProperty.call(message, "hero_odds"))
                writer.uint32(/* id 2, wireType 1 =*/17).double(message.hero_odds);
            return writer;
        };

        /**
         * Encodes the specified UpdateOdds message, length delimited. Does not implicitly {@link msg.UpdateOdds.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.UpdateOdds
         * @static
         * @param {msg.IUpdateOdds} message UpdateOdds message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UpdateOdds.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an UpdateOdds message from the specified reader or buffer.
         * @function decode
         * @memberof msg.UpdateOdds
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.UpdateOdds} UpdateOdds
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UpdateOdds.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UpdateOdds();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.hero_id = reader.int32();
                    break;
                case 2:
                    message.hero_odds = reader.double();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an UpdateOdds message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.UpdateOdds
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.UpdateOdds} UpdateOdds
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UpdateOdds.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an UpdateOdds message.
         * @function verify
         * @memberof msg.UpdateOdds
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UpdateOdds.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.hero_id != null && message.hasOwnProperty("hero_id"))
                if (!$util.isInteger(message.hero_id))
                    return "hero_id: integer expected";
            if (message.hero_odds != null && message.hasOwnProperty("hero_odds"))
                if (typeof message.hero_odds !== "number")
                    return "hero_odds: number expected";
            return null;
        };

        return UpdateOdds;
    })();

    msg.UpdateOddsToClient = (function() {

        /**
         * Properties of an UpdateOddsToClient.
         * @memberof msg
         * @interface IUpdateOddsToClient
         * @property {Object.<string,msg.IUpdateOdds>|null} [hero_odds] UpdateOddsToClient hero_odds
         */

        /**
         * Constructs a new UpdateOddsToClient.
         * @memberof msg
         * @classdesc Represents an UpdateOddsToClient.
         * @implements IUpdateOddsToClient
         * @constructor
         * @param {msg.IUpdateOddsToClient=} [properties] Properties to set
         */
        function UpdateOddsToClient(properties) {
            this.hero_odds = {};
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UpdateOddsToClient hero_odds.
         * @member {Object.<string,msg.IUpdateOdds>} hero_odds
         * @memberof msg.UpdateOddsToClient
         * @instance
         */
        UpdateOddsToClient.prototype.hero_odds = $util.emptyObject;

        /**
         * Creates a new UpdateOddsToClient instance using the specified properties.
         * @function create
         * @memberof msg.UpdateOddsToClient
         * @static
         * @param {msg.IUpdateOddsToClient=} [properties] Properties to set
         * @returns {msg.UpdateOddsToClient} UpdateOddsToClient instance
         */
        UpdateOddsToClient.create = function create(properties) {
            return new UpdateOddsToClient(properties);
        };

        /**
         * Encodes the specified UpdateOddsToClient message. Does not implicitly {@link msg.UpdateOddsToClient.verify|verify} messages.
         * @function encode
         * @memberof msg.UpdateOddsToClient
         * @static
         * @param {msg.IUpdateOddsToClient} message UpdateOddsToClient message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UpdateOddsToClient.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hero_odds != null && Object.hasOwnProperty.call(message, "hero_odds"))
                for (var keys = Object.keys(message.hero_odds), i = 0; i < keys.length; ++i) {
                    writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]);
                    $root.msg.UpdateOdds.encode(message.hero_odds[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
                }
            return writer;
        };

        /**
         * Encodes the specified UpdateOddsToClient message, length delimited. Does not implicitly {@link msg.UpdateOddsToClient.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.UpdateOddsToClient
         * @static
         * @param {msg.IUpdateOddsToClient} message UpdateOddsToClient message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UpdateOddsToClient.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an UpdateOddsToClient message from the specified reader or buffer.
         * @function decode
         * @memberof msg.UpdateOddsToClient
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.UpdateOddsToClient} UpdateOddsToClient
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UpdateOddsToClient.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UpdateOddsToClient(), key, value;
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    if (message.hero_odds === $util.emptyObject)
                        message.hero_odds = {};
                    var end2 = reader.uint32() + reader.pos;
                    key = 0;
                    value = null;
                    while (reader.pos < end2) {
                        var tag2 = reader.uint32();
                        switch (tag2 >>> 3) {
                        case 1:
                            key = reader.int32();
                            break;
                        case 2:
                            value = $root.msg.UpdateOdds.decode(reader, reader.uint32());
                            break;
                        default:
                            reader.skipType(tag2 & 7);
                            break;
                        }
                    }
                    message.hero_odds[key] = value;
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an UpdateOddsToClient message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.UpdateOddsToClient
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.UpdateOddsToClient} UpdateOddsToClient
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UpdateOddsToClient.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an UpdateOddsToClient message.
         * @function verify
         * @memberof msg.UpdateOddsToClient
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UpdateOddsToClient.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.hero_odds != null && message.hasOwnProperty("hero_odds")) {
                if (!$util.isObject(message.hero_odds))
                    return "hero_odds: object expected";
                var key = Object.keys(message.hero_odds);
                for (var i = 0; i < key.length; ++i) {
                    if (!$util.key32Re.test(key[i]))
                        return "hero_odds: integer key{k:int32} expected";
                    {
                        var error = $root.msg.UpdateOdds.verify(message.hero_odds[key[i]]);
                        if (error)
                            return "hero_odds." + error;
                    }
                }
            }
            return null;
        };

        return UpdateOddsToClient;
    })();

    msg.UserWinTheGame = (function() {

        /**
         * Properties of a UserWinTheGame.
         * @memberof msg
         * @interface IUserWinTheGame
         * @property {number|Long|null} [win_money] UserWinTheGame win_money
         * @property {number|null} [hero_id] UserWinTheGame hero_id
         * @property {number|null} [hero_odds] UserWinTheGame hero_odds
         */

        /**
         * Constructs a new UserWinTheGame.
         * @memberof msg
         * @classdesc Represents a UserWinTheGame.
         * @implements IUserWinTheGame
         * @constructor
         * @param {msg.IUserWinTheGame=} [properties] Properties to set
         */
        function UserWinTheGame(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UserWinTheGame win_money.
         * @member {number|Long} win_money
         * @memberof msg.UserWinTheGame
         * @instance
         */
        UserWinTheGame.prototype.win_money = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * UserWinTheGame hero_id.
         * @member {number} hero_id
         * @memberof msg.UserWinTheGame
         * @instance
         */
        UserWinTheGame.prototype.hero_id = 0;

        /**
         * UserWinTheGame hero_odds.
         * @member {number} hero_odds
         * @memberof msg.UserWinTheGame
         * @instance
         */
        UserWinTheGame.prototype.hero_odds = 0;

        /**
         * Creates a new UserWinTheGame instance using the specified properties.
         * @function create
         * @memberof msg.UserWinTheGame
         * @static
         * @param {msg.IUserWinTheGame=} [properties] Properties to set
         * @returns {msg.UserWinTheGame} UserWinTheGame instance
         */
        UserWinTheGame.create = function create(properties) {
            return new UserWinTheGame(properties);
        };

        /**
         * Encodes the specified UserWinTheGame message. Does not implicitly {@link msg.UserWinTheGame.verify|verify} messages.
         * @function encode
         * @memberof msg.UserWinTheGame
         * @static
         * @param {msg.IUserWinTheGame} message UserWinTheGame message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWinTheGame.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.win_money != null && Object.hasOwnProperty.call(message, "win_money"))
                writer.uint32(/* id 1, wireType 0 =*/8).int64(message.win_money);
            if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hero_id);
            if (message.hero_odds != null && Object.hasOwnProperty.call(message, "hero_odds"))
                writer.uint32(/* id 3, wireType 1 =*/25).double(message.hero_odds);
            return writer;
        };

        /**
         * Encodes the specified UserWinTheGame message, length delimited. Does not implicitly {@link msg.UserWinTheGame.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.UserWinTheGame
         * @static
         * @param {msg.IUserWinTheGame} message UserWinTheGame message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserWinTheGame.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserWinTheGame message from the specified reader or buffer.
         * @function decode
         * @memberof msg.UserWinTheGame
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.UserWinTheGame} UserWinTheGame
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWinTheGame.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserWinTheGame();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.win_money = reader.int64();
                    break;
                case 2:
                    message.hero_id = reader.int32();
                    break;
                case 3:
                    message.hero_odds = reader.double();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserWinTheGame message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.UserWinTheGame
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.UserWinTheGame} UserWinTheGame
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserWinTheGame.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserWinTheGame message.
         * @function verify
         * @memberof msg.UserWinTheGame
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserWinTheGame.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.win_money != null && message.hasOwnProperty("win_money"))
                if (!$util.isInteger(message.win_money) && !(message.win_money && $util.isInteger(message.win_money.low) && $util.isInteger(message.win_money.high)))
                    return "win_money: integer|Long expected";
            if (message.hero_id != null && message.hasOwnProperty("hero_id"))
                if (!$util.isInteger(message.hero_id))
                    return "hero_id: integer expected";
            if (message.hero_odds != null && message.hasOwnProperty("hero_odds"))
                if (typeof message.hero_odds !== "number")
                    return "hero_odds: number expected";
            return null;
        };

        return UserWinTheGame;
    })();

    msg.TickOutInfo = (function() {

        /**
         * Properties of a TickOutInfo.
         * @memberof msg
         * @interface ITickOutInfo
         * @property {number|null} [tick_code] TickOutInfo tick_code
         * @property {string|null} [tick_msg] TickOutInfo tick_msg
         */

        /**
         * Constructs a new TickOutInfo.
         * @memberof msg
         * @classdesc Represents a TickOutInfo.
         * @implements ITickOutInfo
         * @constructor
         * @param {msg.ITickOutInfo=} [properties] Properties to set
         */
        function TickOutInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * TickOutInfo tick_code.
         * @member {number} tick_code
         * @memberof msg.TickOutInfo
         * @instance
         */
        TickOutInfo.prototype.tick_code = 0;

        /**
         * TickOutInfo tick_msg.
         * @member {string} tick_msg
         * @memberof msg.TickOutInfo
         * @instance
         */
        TickOutInfo.prototype.tick_msg = "";

        /**
         * Creates a new TickOutInfo instance using the specified properties.
         * @function create
         * @memberof msg.TickOutInfo
         * @static
         * @param {msg.ITickOutInfo=} [properties] Properties to set
         * @returns {msg.TickOutInfo} TickOutInfo instance
         */
        TickOutInfo.create = function create(properties) {
            return new TickOutInfo(properties);
        };

        /**
         * Encodes the specified TickOutInfo message. Does not implicitly {@link msg.TickOutInfo.verify|verify} messages.
         * @function encode
         * @memberof msg.TickOutInfo
         * @static
         * @param {msg.ITickOutInfo} message TickOutInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TickOutInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.tick_code != null && Object.hasOwnProperty.call(message, "tick_code"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tick_code);
            if (message.tick_msg != null && Object.hasOwnProperty.call(message, "tick_msg"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.tick_msg);
            return writer;
        };

        /**
         * Encodes the specified TickOutInfo message, length delimited. Does not implicitly {@link msg.TickOutInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof msg.TickOutInfo
         * @static
         * @param {msg.ITickOutInfo} message TickOutInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TickOutInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a TickOutInfo message from the specified reader or buffer.
         * @function decode
         * @memberof msg.TickOutInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {msg.TickOutInfo} TickOutInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TickOutInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.TickOutInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.tick_code = reader.int32();
                    break;
                case 2:
                    message.tick_msg = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a TickOutInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof msg.TickOutInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {msg.TickOutInfo} TickOutInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TickOutInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a TickOutInfo message.
         * @function verify
         * @memberof msg.TickOutInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        TickOutInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.tick_code != null && message.hasOwnProperty("tick_code"))
                if (!$util.isInteger(message.tick_code))
                    return "tick_code: integer expected";
            if (message.tick_msg != null && message.hasOwnProperty("tick_msg"))
                if (!$util.isString(message.tick_msg))
                    return "tick_msg: string expected";
            return null;
        };

        return TickOutInfo;
    })();

    return msg;
})();